package HeadFirst设计模式._1_策略模式._5_.Duck;

import HeadFirst设计模式._1_策略模式._5_.Fly.FlyWithWings;
import HeadFirst设计模式._1_策略模式._5_.Quack.MuteQuack;

/**
 * 绿头鸭
 */
public class MallardDuck extends Duck {

    public MallardDuck(){
        flyBehavior = new FlyWithWings();
        quackBehavior = new MuteQuack();
    }

    @Override
    public void display() {
        System.out.println("外观是绿头");
    }

    @Override
    public void swim() {
        super.swim();
    }

}
